package com.light.mapcomponents;

import org.anddev.andengine.entity.scene.Scene;
import org.anddev.andengine.entity.shape.Shape;
import org.anddev.andengine.extension.physics.box2d.PhysicsFactory;
import org.anddev.andengine.extension.physics.box2d.PhysicsWorld;

import com.badlogic.gdx.physics.box2d.BodyDef.BodyType;
import com.badlogic.gdx.physics.box2d.FixtureDef;
import com.light.roller.Roller;

public class MovingBarHolder extends StaticWall{

	public MovingBarHolder(Shape shape, String textureName) 
	{
			
		super(shape, textureName,0);		

	}

	@Override
	public void onLoadScene(Scene scene, PhysicsWorld physicsWorld) { 
		
		FixtureDef tempFixtureDef = PhysicsFactory.createFixtureDef(0, 0.0f, 1.0f);
		tempFixtureDef.filter.categoryBits = Roller.CATEGORYBIT_BAR_HOLDER;
		tempFixtureDef.filter.maskBits = Roller.MASKBIT_BAR_HOLDER;
		
		m_body = PhysicsFactory.createBoxBody(physicsWorld, m_shape, BodyType.StaticBody, tempFixtureDef);
		//scene.attachChild(m_shape);
	}
}
